﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="AreaEdit.aspx.cs" Inherits="Demo.Web.Catalogs.AreaEdit" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <link href="../Resources/css/styles.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript">
        var Clear = function () {
            var name = Ext.getCmp('txtDescription');
            name.setValue('');
            name.clearInvalid();
        }
    </script>			

</head>
<body>
    <form id="form1" runat="server">
    <ext:ResourceManager ID="ResourceManager1" runat="server" />   
    <ext:TabPanel ID="TabPanel1" runat="server" ActiveTabIndex="0" Border="true" DeferredRender="false"
        Layout="FitLayout">
        <Items>
             <ext:FormPanel ID="TecnologyInfo" runat="server" Title="Informacion de Areas"
                Icon="ChartOrganisation" DefaultAnchor="100%" BodyPadding="5">
                <Items>
                    <ext:TextField ID="txtAreaID" Visible="false" runat="server" FieldLabel="ID"
                        Disabled="true" MaxLength="200" Name="ID" />
                    <ext:TextField ID="txtDescription" runat="server" FieldLabel="Descripcion" IsRemoteValidation="true"
                        BlankText="Descripcion es Requerida" AllowBlank="false" MaxLength="200">
                        <RemoteValidation OnValidation="CheckName" />
                    </ext:TextField>
                </Items>
                <Listeners>
                    <ValidityChange Handler="#{btnGuardar}.setDisabled(!valid);" />
                </Listeners>
            </ext:FormPanel>
        </Items>
         <TopBar>
            <ext:Toolbar ID="Toolbar1" runat="server">
                <LayoutConfig>
                    <ext:HBoxLayoutConfig Align="top" Pack="Start" />
                </LayoutConfig>
                <Items>
                    <ext:Button ID="CancelButton" runat="server" Text="Limpiar" Icon="Decline">
                        <Listeners>
                            <Click Fn="Clear" />
                        </Listeners>
                    </ext:Button>
                    <ext:Button ID="btnGuardar" runat="server" Text="Guardar" Icon="Accept" Disabled="true">
                        <DirectEvents>
                            <Click OnEvent="Guardar">
                                <EventMask ShowMask="true" />
                            </Click>
                        </DirectEvents>
                    </ext:Button>
                </Items>
            </ext:Toolbar>
        </TopBar>
    </ext:TabPanel>
    </form>
</body>
</html>
